package com.group.project.hrms.service.impl;

import com.group.project.hrms.entity.HolidayList;
import com.group.project.hrms.mapper.HolidayListMapper;
import com.group.project.hrms.service.IHolidayListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HolidayListService implements IHolidayListService {

    @Autowired
    private HolidayListMapper holidayListMapper;

    @Override
    public int insertHolidayList(HolidayList holidayList) {
        return holidayListMapper.insert(holidayList);
    }

    @Override
    public int deleteHolidayList(HolidayList holidayList) {
        return holidayListMapper.deleteByPrimaryKey(holidayList);
    }

    @Override
    public int updateHolidayList(HolidayList holidayList) {
        return holidayListMapper.updateByPrimaryKey(holidayList);
    }

    @Override
    public HolidayList selectOneHolidayList(HolidayList holidayList) {
        return holidayListMapper.selectByPrimaryKey(holidayList);
    }

    @Override
    public List<HolidayList> selectAllHolidayList() {
        return holidayListMapper.selectAll();
    }
}
